package com.littlehu.service.impl;

import com.littlehu.mapper.UserTokenMapper;
import com.littlehu.pojo.UserToken;
import com.littlehu.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author littlehu
 * @data 2018/6/28 16:48
 * @Email 807115007@qq.com
 **/
@Service
public class TokenServiceImpl implements TokenService {

    @Autowired
    private UserTokenMapper userTokenMapper;

    @Override
    public UserToken selectUserTokenById(Integer id) {
        return userTokenMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertUserToken(UserToken userToken) {
        return userTokenMapper.insert(userToken);
    }

    @Override
    public int updateUserToken(UserToken userToken) {
        return userTokenMapper.updateByPrimaryKey(userToken);
    }
}
